package com.weibo.demos.web.Mapper;


import com.weibo.demos.web.entity.CommentDTO;
import com.weibo.demos.web.entity.WeiboVO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentMapper {

    @Insert("insert into comment(weibo_id,content,user_id,created) values(#{weiboId},#{content},#{userId},now())")
    void insert(CommentDTO commentDTO);


    List<WeiboVO> selectByWeiboId(Integer weiboId);

}
